Interactives

Column

Filters

Datatable

Column

Interactive map

Information

Blurb

Crosstalk: Shiny-like without Shiny

Self-service interactive tools have great power to support decisions by policy-makers. Shiny apps are a natural fit for this, but it’s not always easy to share them within the public sector. This is due to issues like a lack of server space, highly sensitive data and users who aren’t R-savvy.

We’ve approached this problem in the UK’s Department for Education by sharing interactive HTML widgets – embeddable JavaScript visualisation libraries – within RMarkdown outputs. Interactivity is, however, limited because selections in one widget don’t impact the data presented in another.

Joe Cheng’s Crosstalk package overcomes this with shared data objects that react to user inputs, altering the content of multiple widgets on the fly. I’ll explain how I used Crosstalk to develop a ‘pseudo-app’ for exploring schools data with the Leaflet (maps), Plotly (charts) and DT (tables) widgets inside the Flexdashboard framework and how I shared it easily with policy-making users as a static HTML file for exploration in the browser.

How to use

  • Filter the data (options above) and the map and table will auto-update
  • You can also select points using the movable/resizeable selection tool (click the broken rectangle button in the upper left of the map)
  • You can also click rows of the datatable to highlight those points
  • Zoom with the + and - buttons on the map (upper left), or with your mouse wheel
  • Click markers to get information about that point

Tools and thanks

  • Mapping (leaflet) geolocation (freegeoip) of artificially-generated IP addresses (generator) with arbitrarily-assigned colours and icons (ionicons)
  • Wrapping this into a user-friendly interface (flexdashboard) and including a table (DT)
  • Allowing data selections to impact across both the map and table (crosstalk)